package Day02;

public class DateTypeCastDemo {
    public static void main(String[] args) {
        char c = 'a';
        int i = c;
        short s =(short)c;
        c=(char) s;
        System.out.println(i+" "+s+" "+c);


        double d2 = i;
        System.out.println(d2);


        long l1 = 1000000000000000000L;
        int i1 = (int)l1;
        System.out.println(i1);


        double d1 = 3.14;
        int i2 = (int)d1;
        System.out.println(i2);
        //整型直接量能直接赋值与byte short char
        char c1 = 50;
        System.out.println(c1);

        //
        byte b1 = 5, b2 = 6;
        byte b3 = (byte) (b1+b2);//运算时char short byte自动转int
        System.out.println(b3);
        System.out.println('2');
        System.out.println('2'+2);
        System.out.println('2'+'2');
        /**/

    }
}
